<?php

require_once 'db.php';

class Keywords extends DB {

    public function select() {
        $this->getConnection();
        $query = 'SELECT * FROM keywords';
        $keywords = $this->query($query);
        return $keywords;
    }
    
     public function selectLen() {
        $this->getConnection();
        $query = 'SELECT * FROM keywords';
        $keywords = $this->query($query);
        foreach ($keywords as $list_keywords):
            if(strlen($list_keywords['name']) > 10){
                echo $list_keywords['id'] ;
                echo $list_keywords['name']."<br>";
            };
        endforeach;
        return $keywords;
    }
}
?>